import { Opt } from '__com/Opt.js'
import ruleOpt from '@/option/rule.js'

export class editOpt extends Opt {
  constructor(fun) {
    super(fun)
  }

  create() {
    return [
      {
        title: '功能包名称',
        key: 'title',
        placeholder: '请输入功能包名称',
        input: {
          maxlength: 20
        },
        rules: [ruleOpt.required('功能包名称不能为空')]
      },

      {
        title: '外部说明',
        key: 'externalContent',
        placeholder: '请填写“外部”说明信息',
        input: {
          showWordLimit: true,
          maxlength: 300,
          autosize: {
            minRows: 4,
            maxRows: 6
          },
          type: 'textarea'
        }
      },
      {
        title: '内部说明',
        key: 'internalContent',
        placeholder: '请填写“内部”说明信息',
        input: {
          showWordLimit: true,
          maxlength: 300,
          autosize: {
            minRows: 4,
            maxRows: 6
          },
          type: 'textarea'
        }
      }
    ]
  }
}
